Remove the interpolation buffer#53
Merged
Merged
Conversation
- Soft sync is done in the output transfer buffer - A small 1 KB null buffer is always allocated (much less than teh prior approach) in internal memory. This avoids flash/psram contention at the start of a stream when stuttering is most common
There was a problem hiding this comment.
Pull request overview
This PR removes the dedicated interpolation transfer buffer and shifts both soft-sync frame insertion and hard-sync/initial-sync silence emission to operate without an extra heap-allocated buffer (using the decode transfer buffer’s spare-frame reservation for soft sync, and a fixed zero scratch buffer for silence writes). This reduces memory use and avoids flash/PSRAM contention during stream start on ESP32-class targets.
Changes:
- Removed
interpolation_transfer_bufferand its config knob; soft-sync insertion now uses a reserved spare frame insidedecode_buffer. - Added
silence_remaining+send_pending_silence()to stream silence directly to the sink using a fixed 1KB zero scratch buffer. - Updated docs to reflect the new soft-sync insertion position and the config/API change.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/sync_task.h |
Removes interpolation buffer field; adds silence tracking and updates comments for new soft-sync strategy. |
src/sync_task.cpp |
Implements silence streaming via scratch buffer; moves soft-sync insertion to decode buffer spare frame; removes interpolation buffer allocation/usage. |
include/sendspin/config.h |
Removes interpolation_buffer_location from PlayerRoleConfig. |
docs/internals.md |
Updates soft-sync description to match “near end” insertion behavior. |
docs/integration-guide.md |
Updates configuration documentation to remove interpolation buffer option and clarify decode_buffer_location. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.